﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_RptHoaDonNoThanhToan : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvNhanVien")]
        private ADVObjects _AdvNhanVien;
        [AccessedThroughProperty("CboDonVi")]
        private ComboBox _CboDonVi;
        [AccessedThroughProperty("CmdCancel")]
        private Button _CmdCancel;
        [AccessedThroughProperty("CmdOK")]
        private Button _CmdOK;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("OptLietKeCungTrang")]
        private RadioButton _OptLietKeCungTrang;
        [AccessedThroughProperty("OptLietKeKhacTrang")]
        private RadioButton _OptLietKeKhacTrang;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("Panel2")]
        private Panel _Panel2;
        [AccessedThroughProperty("TabControl1")]
        private TabControl _TabControl1;
        [AccessedThroughProperty("TabPage1")]
        private TabPage _TabPage1;
        [AccessedThroughProperty("TxtDenNgay")]
        private DateTimePicker _TxtDenNgay;
        [AccessedThroughProperty("TxtMaKH")]
        private TextBox _TxtMaKH;
        [AccessedThroughProperty("TxtTenKH")]
        private TextBox _TxtTenKH;
        [AccessedThroughProperty("VSList")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSList;
        private DataView cFrmData;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private clsXuatKho objXK;

        public Frm_RptHoaDonNoThanhToan()
        {
            base.Load += new EventHandler(this.Frm_RptHoaDonNoThanhToan_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objXK = new clsXuatKho();
            this.InitializeComponent();
        }

        private void AdvNhanVien_ValueChanged(object sender, EventArgs e)
        {
            this.LoadData();
        }

        private void CmdCancel_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            if (this.OptLietKeCungTrang.Checked)
            {
                this.PrintReport();
            }
            else
            {
                this.PrintReportMau2();
            }
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_RptHoaDonNoThanhToan_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                BuildComboModule.BuildCombo(this.CboDonVi, modGeneral.ListDanhMuc.DonVi, true, "", "");
                this.CboDonVi.SelectedValue = modGeneral.H_CLIENT;
                this.TxtDenNgay.Text = Strings.Format(DateAndTime.Today, "dd/MM/yyyy");
                if (modGeneral.H_GIOIHANDULIEU)
                {
                    this.AdvNhanVien.Value = modGeneral.H_USERID;
                    this.AdvNhanVien.ReadOnly = true;
                }
                else
                {
                    this.AdvNhanVien.Value = "";
                    this.AdvNhanVien.ReadOnly = false;
                }
                this.LoadData();
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_RptHoaDonNoThanhToan));
            this.GroupBox1 = new GroupBox();
            this.AdvNhanVien = new ADVObjects();
            this.Label1 = new Label();
            this.OptLietKeKhacTrang = new RadioButton();
            this.OptLietKeCungTrang = new RadioButton();
            this.TxtDenNgay = new DateTimePicker();
            this.Label3 = new Label();
            this.CboDonVi = new ComboBox();
            this.Label2 = new Label();
            this.CmdCancel = new Button();
            this.CmdOK = new Button();
            this.TabControl1 = new TabControl();
            this.TabPage1 = new TabPage();
            this.VSList = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.Panel2 = new Panel();
            this.Label4 = new Label();
            this.TxtTenKH = new TextBox();
            this.TxtMaKH = new TextBox();
            this.Panel1 = new Panel();
            this.GroupBox1.SuspendLayout();
            this.TabControl1.SuspendLayout();
            this.TabPage1.SuspendLayout();
            this.VSList.BeginInit();
            this.Panel2.SuspendLayout();
            this.Panel1.SuspendLayout();
            this.SuspendLayout();
            this.GroupBox1.BackColor = Color.Transparent;
            this.GroupBox1.Controls.Add(this.AdvNhanVien);
            this.GroupBox1.Controls.Add(this.Label1);
            this.GroupBox1.Controls.Add(this.OptLietKeKhacTrang);
            this.GroupBox1.Controls.Add(this.OptLietKeCungTrang);
            this.GroupBox1.Controls.Add(this.TxtDenNgay);
            this.GroupBox1.Controls.Add(this.Label3);
            this.GroupBox1.Controls.Add(this.CboDonVi);
            this.GroupBox1.Controls.Add(this.Label2);
            this.GroupBox1.Dock = DockStyle.Top;
            Point point = new Point(0, 0);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            Size size = new Size(0x201, 0x6c);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 0;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "T\x00f9y chọn";
            this.AdvNhanVien.Conditions = "";
            this.AdvNhanVien.LoaiDoiTuong = modGeneral.TypeObjects.NhanVien;
            point = new Point(0x8e, 0x40);
            this.AdvNhanVien.Location = point;
            this.AdvNhanVien.Name = "AdvNhanVien";
            this.AdvNhanVien.ReadOnly = false;
            size = new Size(0x11a, 20);
            this.AdvNhanVien.Size = size;
            this.AdvNhanVien.TabIndex = 0x69;
            this.AdvNhanVien.UpperText = true;
            this.AdvNhanVien.Value = "";
            this.AdvNhanVien.WidthCode = 80;
            this.Label1.AutoEllipsis = true;
            this.Label1.AutoSize = true;
            point = new Point(50, 0x44);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            this.Label1.RightToLeft = RightToLeft.No;
            size = new Size(0x3b, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x68;
            this.Label1.Text = "Nh\x00e2n vi\x00ean ";
            this.Label1.TextAlign = ContentAlignment.TopRight;
            this.OptLietKeKhacTrang.AutoSize = true;
            point = new Point(300, 0x56);
            this.OptLietKeKhacTrang.Location = point;
            this.OptLietKeKhacTrang.Name = "OptLietKeKhacTrang";
            size = new Size(0x6f, 0x11);
            this.OptLietKeKhacTrang.Size = size;
            this.OptLietKeKhacTrang.TabIndex = 0x67;
            this.OptLietKeKhacTrang.TabStop = true;
            this.OptLietKeKhacTrang.Text = "&Liệt k\x00ea kh\x00e1c trang";
            this.OptLietKeKhacTrang.UseVisualStyleBackColor = true;
            this.OptLietKeCungTrang.AutoSize = true;
            this.OptLietKeCungTrang.Checked = true;
            point = new Point(0x8d, 0x56);
            this.OptLietKeCungTrang.Location = point;
            this.OptLietKeCungTrang.Name = "OptLietKeCungTrang";
            size = new Size(0x6f, 0x11);
            this.OptLietKeCungTrang.Size = size;
            this.OptLietKeCungTrang.TabIndex = 0x66;
            this.OptLietKeCungTrang.TabStop = true;
            this.OptLietKeCungTrang.Text = "&Liệt k\x00ea c\x00f9ng trang";
            this.OptLietKeCungTrang.UseVisualStyleBackColor = true;
            this.TxtDenNgay.Format = DateTimePickerFormat.Short;
            point = new Point(0x8e, 0x27);
            this.TxtDenNgay.Location = point;
            this.TxtDenNgay.Name = "TxtDenNgay";
            size = new Size(0x5b, 20);
            this.TxtDenNgay.Size = size;
            this.TxtDenNgay.TabIndex = 100;
            this.Label3.AutoSize = true;
            point = new Point(50, 0x2a);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x4e, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x65;
            this.Label3.Text = "T\x00ednh đến ng\x00e0y";
            this.CboDonVi.DropDownStyle = ComboBoxStyle.DropDownList;
            this.CboDonVi.FormattingEnabled = true;
            point = new Point(0x8e, 14);
            this.CboDonVi.Location = point;
            this.CboDonVi.Name = "CboDonVi";
            size = new Size(0x11a, 0x15);
            this.CboDonVi.Size = size;
            this.CboDonVi.TabIndex = 0x42;
            this.Label2.AutoSize = true;
            point = new Point(50, 0x11);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x26, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x41;
            this.Label2.Text = "Đơn vị";
            this.CmdCancel.DialogResult = DialogResult.Cancel;
            this.CmdCancel.Image = (Image) manager.GetObject("CmdCancel.Image");
            this.CmdCancel.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x1ac, 3);
            this.CmdCancel.Location = point;
            this.CmdCancel.Name = "CmdCancel";
            size = new Size(0x52, 0x18);
            this.CmdCancel.Size = size;
            this.CmdCancel.TabIndex = 0x3f;
            this.CmdCancel.Text = "&Tho\x00e1t";
            this.CmdCancel.UseVisualStyleBackColor = true;
            this.CmdOK.Image = (Image) manager.GetObject("CmdOK.Image");
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x155, 3);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x51, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 0x3e;
            this.CmdOK.Text = "&Chọn";
            this.CmdOK.UseVisualStyleBackColor = true;
            this.TabControl1.Controls.Add(this.TabPage1);
            this.TabControl1.Dock = DockStyle.Fill;
            point = new Point(0, 0x6c);
            this.TabControl1.Location = point;
            this.TabControl1.Name = "TabControl1";
            this.TabControl1.SelectedIndex = 0;
            size = new Size(0x201, 0x164);
            this.TabControl1.Size = size;
            this.TabControl1.TabIndex = 0x40;
            this.TabPage1.Controls.Add(this.VSList);
            this.TabPage1.Controls.Add(this.Panel2);
            point = new Point(4, 0x16);
            this.TabPage1.Location = point;
            this.TabPage1.Name = "TabPage1";
            Padding padding = new Padding(3);
            this.TabPage1.Padding = padding;
            size = new Size(0x1f9, 330);
            this.TabPage1.Size = size;
            this.TabPage1.TabIndex = 0;
            this.TabPage1.Text = "Chọn kh\x00e1ch h\x00e0ng";
            this.TabPage1.UseVisualStyleBackColor = true;
            this.VSList.AutoResize = false;
            this.VSList.BackColor = Color.WhiteSmoke;
            this.VSList.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSList.ColumnInfo = manager.GetString("VSList.ColumnInfo");
            this.VSList.Dock = DockStyle.Fill;
            this.VSList.ExtendLastCol = true;
            this.VSList.FocusRect = FocusRectEnum.None;
            point = new Point(3, 3);
            this.VSList.Location = point;
            this.VSList.Name = "VSList";
            this.VSList.Rows.Count = 1;
            this.VSList.Rows.DefaultSize = 0x11;
            this.VSList.SelectionMode = SelectionModeEnum.Row;
            size = new Size(0x1f3, 300);
            this.VSList.Size = size;
            this.VSList.StyleInfo = manager.GetString("VSList.StyleInfo");
            this.VSList.TabIndex = 0x36;
            this.Panel2.Controls.Add(this.Label4);
            this.Panel2.Controls.Add(this.TxtTenKH);
            this.Panel2.Controls.Add(this.TxtMaKH);
            this.Panel2.Dock = DockStyle.Bottom;
            point = new Point(3, 0x12f);
            this.Panel2.Location = point;
            this.Panel2.Name = "Panel2";
            size = new Size(0x1f3, 0x18);
            this.Panel2.Size = size;
            this.Panel2.TabIndex = 60;
            this.Label4.AutoSize = true;
            point = new Point(1, 6);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(0x18, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x12;
            this.Label4.Text = "T\x00ecm";
            point = new Point(0x93, 2);
            this.TxtTenKH.Location = point;
            this.TxtTenKH.Name = "TxtTenKH";
            size = new Size(0x125, 20);
            this.TxtTenKH.Size = size;
            this.TxtTenKH.TabIndex = 1;
            point = new Point(0x1c, 2);
            this.TxtMaKH.Location = point;
            this.TxtMaKH.Name = "TxtMaKH";
            size = new Size(0x74, 20);
            this.TxtMaKH.Size = size;
            this.TxtMaKH.TabIndex = 0;
            this.Panel1.BackColor = Color.Transparent;
            this.Panel1.Controls.Add(this.CmdOK);
            this.Panel1.Controls.Add(this.CmdCancel);
            this.Panel1.Dock = DockStyle.Bottom;
            point = new Point(0, 0x1d0);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(0x201, 0x20);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0x41;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(0x201, 0x1f0);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.TabControl1);
            this.Controls.Add(this.GroupBox1);
            this.Controls.Add(this.Panel1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_RptHoaDonNoThanhToan";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "BC-BH02             ";
            this.Text = "HOA DON NO THANH TOAN";
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            this.TabControl1.ResumeLayout(false);
            this.TabPage1.ResumeLayout(false);
            this.VSList.EndInit();
            this.Panel2.ResumeLayout(false);
            this.Panel2.PerformLayout();
            this.Panel1.ResumeLayout(false);
            this.ResumeLayout(false);
        }

        public void LoadData()
        {
            clsDMDoiTuong tuong = new clsDMDoiTuong();
            string strConditions = " Charindex('C',Loai) <> 0";
            if (this.AdvNhanVien.Value.Trim() != "")
            {
                strConditions = strConditions + " And KhoaNhanVienQuanLy = '" + this.AdvNhanVien.Value + "'";
            }
            this.cFrmData = new DataView(tuong.ShowListByField("Khoa|0 as Chon|Ma|Ten" + modGeneral.H_LANGUAGE, strConditions, ""));
            if (this.cFrmData != null)
            {
                this.VSList.DataSource = this.cFrmData;
                C1.Win.C1FlexGrid.C1FlexGrid vSList = this.VSList;
                vSList[0, 1] = "";
                vSList[0, 2] = modGeneral.Tranlated("M\x00e3 kh\x00e1ch h\x00e0ng", "");
                vSList[0, 3] = modGeneral.Tranlated("T\x00ean kh\x00e1ch h\x00e0ng", "");
                vSList.Cols[0].Visible = false;
                vSList.Cols[1].DataType = System.Type.GetType("System.Boolean");
                vSList.Cols[1].Width = 20;
                vSList.Cols[2].Width = 100;
                vSList = null;
            }
        }

        public void PrintReport()
        {
            this.Cursor = Cursors.WaitCursor;
            string pKhoaBC = modGeneral.CreatKey("BC_DuLieuDanhMuc", 10, "");
            ReportModule.InitDuLieuDanhMuc(pKhoaBC, this.VSList, 0, 1, "");
            DataTable dataTable = this.objXK.GetDataHoaDonNoThanhToan(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboDonVi.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim(), LVYModule.Date2Char(this.TxtDenNgay.Text), pKhoaBC, this.AdvNhanVien.Value);
            if (dataTable.Rows.Count == 0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Kh\x00f4ng c\x00f3 dữ liệu !", ""));
            }
            else
            {
                Rpt_BangKeHoaDonNoThanhToan toan = new Rpt_BangKeHoaDonNoThanhToan();
                try
                {
                    toan.SetDataSource(dataTable);
                    toan.Subreports[0].SetDataSource(modGeneral.H_DATACOMPANY);
                    if (modGeneral.H_LANGUAGE == "VIET")
                    {
                        toan.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEVIET, ""));
                    }
                    else
                    {
                        toan.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEANH, ""));
                    }
                    toan.SetParameterValue(1, modGeneral.Tranlated("Địa chỉ", "") + ": " + modGeneral.H_ADDRESS);
                    toan.SetParameterValue(2, modGeneral.Tranlated("M\x00e3 số thuế", "") + ": " + modGeneral.H_TAXCODE);
                    toan.SetParameterValue(3, modGeneral.Tranlated("Điện thoại", "") + ": " + modGeneral.H_TELEPHONE);
                    toan.SetParameterValue(4, modGeneral.Tranlated("Fax", "") + ": " + modGeneral.H_FAX);
                    toan.SetParameterValue(5, modGeneral.Tranlated("H\x00d3A ĐƠN NỢ THANH TO\x00c1N", ""));
                    toan.SetParameterValue(6, modGeneral.Tranlated("T\x00ednh đến ng\x00e0y", "") + " : " + this.TxtDenNgay.Text);
                    toan.SetParameterValue(7, modGeneral.Tranlated("Số chứng từ", ""));
                    toan.SetParameterValue(8, modGeneral.Tranlated("Ng\x00e0y", ""));
                    toan.SetParameterValue(9, modGeneral.Tranlated("Tiền h\x00e0ng", ""));
                    toan.SetParameterValue(10, modGeneral.Tranlated("Chiết khấu", ""));
                    toan.SetParameterValue(11, modGeneral.Tranlated("Tiền thuế", ""));
                    toan.SetParameterValue(12, modGeneral.Tranlated("Tổng", ""));
                    toan.SetParameterValue(13, modGeneral.Tranlated("H\x00f3a đơn", ""));
                    toan.SetParameterValue(14, modGeneral.Tranlated("STT", ""));
                    toan.SetParameterValue(15, modGeneral.Tranlated("Ng\x00e0y .... th\x00e1ng .... năm ............", ""));
                    toan.SetParameterValue(0x10, modGeneral.Tranlated("Lập biểu", ""));
                    toan.SetParameterValue(0x11, modGeneral.Tranlated("Tổng cộng", ""));
                    toan.SetParameterValue(0x12, modGeneral.Tranlated("Hạn thanh to\x00e1n", ""));
                    toan.SetParameterValue(0x13, modGeneral.Tranlated("Tỷ lệ", ""));
                    toan.SetParameterValue(20, modGeneral.Tranlated("Trong đ\x00f3", ""));
                    toan.SetParameterValue(0x15, modGeneral.Tranlated("Kh\x00e1ch h\x00e0ng", "") + ":");
                    toan.SetParameterValue(0x16, modGeneral.Tranlated("Điện thoại", "") + ":");
                    toan.SetParameterValue(0x17, modGeneral.Tranlated("Fax", "") + ":");
                    toan.SetParameterValue(0x18, modGeneral.Tranlated("Người phụ tr\x00e1ch", "") + ":");
                    MyProject.Forms.Frm_ViewReport.ReportViewer.ReportSource = toan;
                    MyProject.Forms.Frm_ViewReport.ReportViewer.DisplayGroupTree = false;
                    this.Cursor = Cursors.Default;
                    MyProject.Forms.Frm_ViewReport.ShowDialog();
                }
                catch (Exception exception1)
                {
                    ProjectData.SetProjectError(exception1);
                    Exception exception = exception1;
                    MessageBox.Show(exception.Message.ToString());
                    ProjectData.ClearProjectError();
                }
            }
        }

        public void PrintReportMau2()
        {
            this.Cursor = Cursors.WaitCursor;
            string pKhoaBC = modGeneral.CreatKey("BC_DuLieuDanhMuc", 10, "");
            ReportModule.InitDuLieuDanhMuc(pKhoaBC, this.VSList, 0, 1, "");
            DataTable dataTable = this.objXK.GetDataHoaDonNoThanhToan(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboDonVi.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim(), LVYModule.Date2Char(this.TxtDenNgay.Text), pKhoaBC, this.AdvNhanVien.Value);
            if (dataTable.Rows.Count == 0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Kh\x00f4ng c\x00f3 dữ liệu !", ""));
            }
            else
            {
                Rpt_BangKeHoaDonNoThanhToanMau2 mau = new Rpt_BangKeHoaDonNoThanhToanMau2();
                try
                {
                    mau.SetDataSource(dataTable);
                    mau.Subreports[0].SetDataSource(modGeneral.H_DATACOMPANY);
                    if (modGeneral.H_LANGUAGE == "VIET")
                    {
                        mau.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEVIET, ""));
                    }
                    else
                    {
                        mau.SetParameterValue(0, modGeneral.Tranlated(modGeneral.H_COMPANYNAMEANH, ""));
                    }
                    mau.SetParameterValue(1, modGeneral.Tranlated("Địa chỉ", "") + ": " + modGeneral.H_ADDRESS);
                    mau.SetParameterValue(2, modGeneral.Tranlated("M\x00e3 số thuế", "") + ": " + modGeneral.H_TAXCODE);
                    mau.SetParameterValue(3, modGeneral.Tranlated("Điện thoại", "") + ": " + modGeneral.H_TELEPHONE);
                    mau.SetParameterValue(4, modGeneral.Tranlated("Fax", "") + ": " + modGeneral.H_FAX);
                    mau.SetParameterValue(5, modGeneral.Tranlated("H\x00d3A ĐƠN NỢ THANH TO\x00c1N", ""));
                    mau.SetParameterValue(6, modGeneral.Tranlated("T\x00ednh đến ng\x00e0y", "") + " : " + this.TxtDenNgay.Text);
                    mau.SetParameterValue(7, modGeneral.Tranlated("Số chứng từ", ""));
                    mau.SetParameterValue(8, modGeneral.Tranlated("Ng\x00e0y", ""));
                    mau.SetParameterValue(9, modGeneral.Tranlated("Tiền h\x00e0ng", ""));
                    mau.SetParameterValue(10, modGeneral.Tranlated("Chiết khấu", ""));
                    mau.SetParameterValue(11, modGeneral.Tranlated("Tiền thuế", ""));
                    mau.SetParameterValue(12, modGeneral.Tranlated("Tổng", ""));
                    mau.SetParameterValue(13, modGeneral.Tranlated("H\x00f3a đơn", ""));
                    mau.SetParameterValue(14, modGeneral.Tranlated("STT", ""));
                    mau.SetParameterValue(15, modGeneral.Tranlated("Ng\x00e0y .... th\x00e1ng .... năm ............", ""));
                    mau.SetParameterValue(0x10, modGeneral.Tranlated("Lập biểu", ""));
                    mau.SetParameterValue(0x11, modGeneral.Tranlated("Tổng cộng", ""));
                    mau.SetParameterValue(0x12, modGeneral.Tranlated("Hạn thanh to\x00e1n", ""));
                    mau.SetParameterValue(0x13, modGeneral.Tranlated("Tỷ lệ", ""));
                    mau.SetParameterValue(20, modGeneral.Tranlated("Trong đ\x00f3", ""));
                    mau.SetParameterValue(0x15, modGeneral.Tranlated("Kh\x00e1ch h\x00e0ng", "") + ":");
                    mau.SetParameterValue(0x16, modGeneral.Tranlated("Điện thoại", "") + ":");
                    mau.SetParameterValue(0x17, modGeneral.Tranlated("Fax", "") + ":");
                    mau.SetParameterValue(0x18, modGeneral.Tranlated("Người phụ tr\x00e1ch", "") + ":");
                    MyProject.Forms.Frm_ViewReport.ReportViewer.ReportSource = mau;
                    MyProject.Forms.Frm_ViewReport.ReportViewer.DisplayGroupTree = false;
                    this.Cursor = Cursors.Default;
                    MyProject.Forms.Frm_ViewReport.ShowDialog();
                }
                catch (Exception exception1)
                {
                    ProjectData.SetProjectError(exception1);
                    Exception exception = exception1;
                    MessageBox.Show(exception.Message.ToString());
                    ProjectData.ClearProjectError();
                }
            }
        }

        public void SearchKhachHang(string field, string str)
        {
            string str2 = field + " LIKE '" + str + "%'";
            this.cFrmData.RowFilter = str2;
            if (this.VSList.Rows.Count != 1)
            {
                this.VSList.Select(1, 0, 1, this.VSList.Cols.Count - 1);
            }
        }

        private void TxtMaKH_TextChanged(object sender, EventArgs e)
        {
            this.SearchKhachHang("Ma", this.TxtMaKH.Text);
        }

        private void TxtTenKH_TextChanged(object sender, EventArgs e)
        {
            this.SearchKhachHang("TenViet", this.TxtTenKH.Text);
        }

        internal virtual ADVObjects AdvNhanVien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvNhanVien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                ADVObjects.ValueChangedEventHandler handler = new ADVObjects.ValueChangedEventHandler(this.AdvNhanVien_ValueChanged);
                if (this._AdvNhanVien != null)
                {
                    this._AdvNhanVien.ValueChanged -= handler;
                }
                this._AdvNhanVien = value;
                if (this._AdvNhanVien != null)
                {
                    this._AdvNhanVien.ValueChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboDonVi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboDonVi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboDonVi = value;
            }
        }

        internal virtual Button CmdCancel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdCancel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdCancel_Click);
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click -= handler;
                }
                this._CmdCancel = value;
                if (this._CmdCancel != null)
                {
                    this._CmdCancel.Click += handler;
                }
            }
        }

        internal virtual Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual RadioButton OptLietKeCungTrang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OptLietKeCungTrang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._OptLietKeCungTrang = value;
            }
        }

        internal virtual RadioButton OptLietKeKhacTrang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._OptLietKeKhacTrang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._OptLietKeKhacTrang = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual Panel Panel2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel2 = value;
            }
        }

        internal virtual TabControl TabControl1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TabControl1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TabControl1 = value;
            }
        }

        internal virtual TabPage TabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TabPage1 = value;
            }
        }

        internal virtual DateTimePicker TxtDenNgay
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtDenNgay;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtDenNgay = value;
            }
        }

        internal virtual TextBox TxtMaKH
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtMaKH;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtMaKH_TextChanged);
                if (this._TxtMaKH != null)
                {
                    this._TxtMaKH.TextChanged -= handler;
                }
                this._TxtMaKH = value;
                if (this._TxtMaKH != null)
                {
                    this._TxtMaKH.TextChanged += handler;
                }
            }
        }

        internal virtual TextBox TxtTenKH
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTenKH;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtTenKH_TextChanged);
                if (this._TxtTenKH != null)
                {
                    this._TxtTenKH.TextChanged -= handler;
                }
                this._TxtTenKH = value;
                if (this._TxtTenKH != null)
                {
                    this._TxtTenKH.TextChanged += handler;
                }
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSList
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSList;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._VSList = value;
            }
        }
    }
}

